FILES=$(echo *.py README)
VERSION=$(date "+%Y%m%d")
NAME=pyecs
DIR=$NAME-$VERSION 

rm -rf $DIR
mkdir $DIR || exit 1

cat > $DIR/QINSTALL.sh << EOF
cd ..
[ -L $NAME ] && rm $NAME
if [ ! -e $NAME ]
then
	ln -s $DIR $NAME
fi
EOF

cp $FILES $DIR
tar zcf $DIR.tar.gz $DIR

rm -rf $DIR
